A number of items being marketed in supermarkets and other retail establishments are provided with machine-readable labels which include product-identifying information in bar code format. The most well known of these bar code labels is the Universal Product Code (UPC) label. Viewed in its entirety, a UPC label appears to be a series of black bars of varying widths. In fact, different parts of the label serve different functions. The left and right edges of the label are each defined by a pair of relatively narrow guard bars. The label includes a center separator, consisting of two relatively narrow black bars and three white spaces, which divides the label into left and right halves. Each half of the label includes a number of groups of bars with each group consisting of two black bars and two white bars representing a single numeric character. Different numeric characters are identified by making the white and black bars in a group of different relative widths. The absolute widths of the bars is immaterial. Only their relative widths are important in decoding the label.
To decode the label, the relative widths of the white and black bars in the label are measured. One method and circuit for performing the decoding operation is disclosed in U.S. Pat. No. 4,086,477, issued Apr. 25, 1978 and assigned to the assignee of the present invention.
The subject patent assumes as its starting point that a digitized pulse stream has been generated in which the positive-going square wave pulses represent the widths of UPC label bars of one color while the negative-going square wave pulses represent the widths of the bars of the other color.
The present invention relates to circuitry for deriving the digitized pulse stream to be processed in accordance with the technique disclosed in the subject patent.
In one application, a UPC label is read by a hand held optical wand which an operator moves across the UPC label. The wand includes a scanning tip with a photosensitive element which responds to the alternating white and black bars of the label by generating positive-going and negative-going voltages, respectively. The resulting output signal is a train of nearly-sinusoidal pulses of widely varying amplitudes and widths.
The nearly-sinusoidal shape of the pulses is, in part, a result of the fact that the photosensitive element in the hand-held wand detects light reflected from both white and black bars on the label in changing proportions as the wand moves across the boundary between adjacent bars. As a specific example, assume that a wand above a black bar is approaching the boundary with an adjacent white bar. While the wand is still over the black bar, a minimal amount of light will be reflected to the photosensitive element, causing a minimum voltage to be generated. After the wand has crossed the boundary and is located above the white bar, a maximum amount of light will be reflected to the photosensitive element, causing a maximum voltage to be generated. But as the wand is passing over the boundary, it will "see" changing amounts of both the black bar and the white bar so that the voltages produced will increase gradually from the minimum to the maximum level.
As indicated above, the photosensitive element produces minimum and maximum voltages when it receives reflected light only from a black bar or only from a white bar, respectively. This is an ideal situation which cannot always be realized when small UPC labels are being read. The narrowest white or black bar which is permitted by current standards is 0.008" or 0.2 MM in width. Available optical wands have a field of view which is greater than this dimension. When such a wand is centered above a bar of minimum width, the photosensitive element will receive reflected light not only from that bar but also from flanking bars. More specifically, a wand centered above a narrow black bar will receive reflected light both from the black bar and from the two white bars on either side of the black bar. The voltage which is produced will naturally be somewhat higher than the voltage produced by a wand centered above a broader black bar.
The inverse of the above-described situation holds true, of course, for a wand centered above a white bar of minimum width. Because the wand will detect light reflected not only from the narrow white bar but from the two flanking black bars as well, the voltage which is produced will be somewhat less than the maximum possible voltage.
To generate a train of rectangular pulses, the transition points at which the optical wand passes the boundaries between adjacent white and black bars must be detected. A simple way to detect the transition points is to compare the wand voltage with a fixed threshold voltage. Each time the wand voltage increases above or falls below the fixed threshold voltage, it is assumed that the wand has passed a boundary between adjacent white and black bars.
This arrangement may not always function suitably because the minimum and maximum voltages generated by a photosensitive element will shift as a function of ambient lighting conditions and label quality. A wand which is used to read a label under bright lights will generate a waveform having higher voltages than the same wand used to read the same label in a dimly lighted store. If the threshold voltage is fixed, shifts in the level of the waveform due to changing ambient conditions will cause transitions to be detected before or after they actually occur. Label reading errors will result. In the most extreme case, a waveform generated under bright light conditions might have a minimum voltage exceeding the fixed threshold voltage so that no transitions at all would be detected.
Similarly, a dark label having a greyish background, will reflect considerably less light than a light label having a pure white background. Consequently, the voltage obtained by reading a dark label will be shifted negative relative to voltage obtained upon reading on a lighter label, even if both labels are read at exactly the same ambient lighting level.
Obviously, it is desirable that the label reading process be substantially independent of the effects of ambient lighting conditions and label quality.
Some of the problems of the fixed threshold system discussed above are overcome in an adaptive system in which a threshold voltage is set midway between detected minimum and maximum voltages. While the use of an adaptive threshold ameliorates the problem of waveform level shifting due to changes in ambient lighting conditions or label print quality, it does not provide a solution to the problem of cycle to cycle variations in peak voltages as a result of reading narrow bars. If an extremely narrow bar is read after a narrow bar of the opposite color and a wide bar of the same color, the resulting threshold voltage will be too great relative to the current peak value, resulting in a late transition detection.